import request from '../utils/request';

export default {
    // findAllReport() {
    //     var data1 = {
    //         pageNum: 1,
    //         pageSize: 100
    //     }
    //     return request({
    //         url: `/reportForm/findAllReport/1`,
    //         method: 'post',
    //         data: data1
    //     });
    // },

// 组合查询
getCombineSearch(pageNum,pageSize,deptId,projectName){
    var data1 ={
        pageNum: pageNum,
        pageSize: pageSize
    }
    return request({
        url: `/reportForm/findDepartmentByCondition/0`,
        method: 'post',
        data: data1,
        params: {
            deptId,
            projectName
        }
    });
},
    // 新增项目管理表
    addReport(isSchool, reportVo) {
        return request({
            url: `/reportForm/addReport/${isSchool}`,
            method: 'post',
            data: reportVo
        });
    },
    // 姓名模糊查询项目信息
    getByName(isSchool, reportName) {
        return request({
            url: `/reportForm/getByName/${isSchool}`,
            method: 'get',
            params: {
                reportName
            }
        });
    },
    // 根据id查询项目管理表信息
    findByReportId(isSchool, reportId) {
        return request({
            url: `/reportForm/findByReportId/${isSchool}/${reportId}`,
            method: 'get',

        })
    },
    // 根据id更新项目管理表
    updateReport(isSchool, reportId,reportVo) {
        return request({
            url: `/reportForm/update/${isSchool}/${reportId}`,
            method: 'put',
            data: reportVo
        })
    },
    // 删除项目管理表
    deleteReport(isSchool, reportId) {
        return request({
            url: `/reportForm/deleteReport/${isSchool}`,
            method: 'delete',
            params: {
                reportId
            }
        })
    },
    // 根据名称查询项目管理表（支持模糊查询）
    //todo
    //查询全部项目管理表信息
    //todo
    //—————————————————————————报表部分————————————————————————————————————
    // 创建报表
    createReportForm(isSchool, reportId, schoolReportFormVo) {
        return request({
            url: `/reportForm/createReportForm/${isSchool}/${reportId}`,
            method: 'post',
            data: schoolReportFormVo
        })
    },
    // 删除报表
    deleteReportForm(isSchool, reportFormId) {
        return request({
            url: `/reportForm/deleteReportForm/${isSchool}`,
            method: 'delete',
            params: {
                reportFormId
            }
        })
    },
    // 根据id更新报表
    updateReportForm(reportFormId, schoolReportFormVo) {
        return request({
            url: `/reportForm/updateReportForm/${reportFormId}`,
            method: 'put',
            data: schoolReportFormVo
        })
    },
    // 根据id查询报表信息
    findReportForm(isSchool, reportFormId) {
        return request({
            url: `/reportForm/findReportForm/${isSchool}/${reportFormId}`,
            method: 'get',
        })
    },
}